export const delByIdAction = (payload) => ({
  type: 'delById',
  payload,
});

export const updateByIdAction = (id) => ({
  type: 'updateById',
  payload: id,
});

export const addAction = (newTask) => ({
  type: 'add',
  payload: {
    task: newTask,
    id: Date.now(),
    isDone: false,
  },
});

export const updateTypeAction = (type) => ({
  type: 'updateType',
  payload: type,
});

export const checkAllAction = (checked) => ({
  type: 'checkAll',
  payload: checked,
});
